package io.gitee.baicaixiaozhan.httpmessagewrapper;

import java.io.Serializable;

/**
 * DESC:
 *
 * @author baicaixiaozhan
 * @since v1.0.0
 */
public interface UnifiedResult<T> extends Serializable {

    /**
     * 自定义 code
     *
     * @return {@link String}
     */
    String getCode();

    /**
     * http 状态
     *
     * @return {@link String}
     */
    String getStatus();

    /**
     * 消息
     *
     * @return {@link String}
     */
    String getMessage();

    /**
     * 数据
     *
     * @return {@link T}
     */
    T getData();

    UnifiedResult<T> ok();

    UnifiedResult<T> ok(T data);

    UnifiedResult<T> fail(String code, String status, String message);
}
